/*
 * Created by: vadikv
 * Created: Wednesday, March 05, 2008
 */

using System;
using System.Collections.Generic;
using OneDayModel.Interfaces;

namespace OneDayModel.PresentationLogic
{
    public interface INewUserProfileUI
    {
        event EventHandler<RolesSelectionArgs> onRolesSelection;
        event EventHandler<SaveProfileArgs> onSaveProfile;
        event EventHandler<SaveProfileArgs> onReturnToQuestioner;

        void SetAvailableRoles(string[] roles);
        void ShowAttributes(IEnumerable<IAttributeRecord> attributes);
        void ShowNewEMailOption();
        void ShowRetrieveCredantials(string email);
        void ShowMissingAttributesInfo(string[] missedAttributes);
        void ShowBackToQuestioner();
    }

    public class SaveProfileArgs : EventArgs
    {
        private readonly IAttributeRecord[] attributes;

        public SaveProfileArgs(IAttributeRecord[] attributes)
        {
            this.attributes = attributes;
        }

        public IAttributeRecord[] Attributes
        {
            get { return attributes; }
        }
    }

    public class RolesSelectionArgs : EventArgs
    {
        private readonly string[] selectedRoles;

        public RolesSelectionArgs(string[] selectedRoles)
        {
            this.selectedRoles = selectedRoles;
        }

        public string[] SelectedRoles
        {
            get { return selectedRoles; }
        }
    }
}